﻿<Window x:Class="McTools.Xrm.Connection.WpfForms.ConnectionForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ConnectionForm" Height="479" Width="451" Loaded="WindowLoaded1">
    <Grid Background="#FFE9EDF1">
        <Label Content="Connection name" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top"/>
        <TextBox Name="txtConnectionName" Height="23" Margin="149,10,10,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top"/>
        <GroupBox Header="Server information" Margin="10,41,10,0" VerticalAlignment="Top" Height="138">
            <Grid>
                <CheckBox Name="chkUseSsl" Content="Use SSL" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top"/>
                <CheckBox Name="chkUseIfd" Content="IFD" HorizontalAlignment="Left" Margin="82,10,0,0" VerticalAlignment="Top" Checked="ChkUseIfdChecked" Unchecked="ChkUseIfdUnchecked" />
                <CheckBox Name="chkUseOnline" Content="CRM Online" HorizontalAlignment="Left" Margin="130,10,0,0" VerticalAlignment="Top" Checked="ChkUseOnlineChecked" Unchecked="ChkUseOnlineUnchecked"/>
                <CheckBox Name="chkUserOsdp" Content="Connect with Office 365" HorizontalAlignment="Left" Margin="226,10,0,0" VerticalAlignment="Top" Checked="ChkUserOsdpChecked" Unchecked="ChkUserOsdpUnchecked"/>
                <TextBox Name="txtServerName" Height="23" Margin="130,31,10,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top"/>
                <TextBox Name="txtServerPort" Height="23" Margin="130,59,10,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top"/>
                <TextBox Name="txtHomeRealmUri" Height="23" Margin="130,87,10,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top"/>
                <Label Content="Server name" HorizontalAlignment="Left" Margin="10,31,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.342,-0.115"/>
                <Label Content="Server port" HorizontalAlignment="Left" Margin="10,57,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.342,-0.115"/>
                <Label Content="Home realm uri" HorizontalAlignment="Left" Margin="10,84,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.342,-0.115"/>
            </Grid>
        </GroupBox>
        <GroupBox Header="Authentication" Margin="10,184,10,0" VerticalAlignment="Top" Height="157">
            <Grid>
            <RadioButton Name="rdbIntegrated" Content="Windows Integrated Authentication" HorizontalAlignment="Left" Height="19" VerticalAlignment="Top" Width="209" Margin="10,10,0,0" Checked="RdbIntegratedChecked"/>
            <RadioButton Name="rdbCustom" Content="Custom authentication" HorizontalAlignment="Left" Height="19" VerticalAlignment="Top" Width="150" Margin="230,10,0,0" Checked="RdbCustomChecked"/>
                <TextBox Name="txtDomain" Height="23" Margin="130,31,10,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top"/>
                <TextBox Name="txtLogin" Height="23" Margin="130,59,10,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top"/>
                <PasswordBox Name="txtPassword" Margin="130,87,10,0" VerticalAlignment="Top" RenderTransformOrigin="-0.6,0.05"/>
                <Label Content="Domain" Margin="10,31,318,0" VerticalAlignment="Top" RenderTransformOrigin="0.342,-0.115"/>
                <Label Content="Login" HorizontalAlignment="Left" Margin="10,57,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.342,-0.115"/>
                <Label Content="Password" HorizontalAlignment="Left" Margin="10,84,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.342,-0.115"/>
                <Label Content="Save password in configuration file (the password will be encrypted)" HorizontalAlignment="Left" Margin="10,110,0,0" VerticalAlignment="Top"/>
                <CheckBox Name="chkSavePassword" Content="" HorizontalAlignment="Left" Margin="384,115,0,0" VerticalAlignment="Top"/>
            </Grid>
        </GroupBox>
        <GroupBox Header="Organization" Margin="10,346,10,0" VerticalAlignment="Top" Height="60">
            <Grid>
                <ComboBox Name="cbbOrganizations" Margin="10,10,129,0" VerticalAlignment="Top"/>
                <Button Name="btnGetOrgs" Content="Get organizations" Margin="0,10,10,0" VerticalAlignment="Top" HorizontalAlignment="Right" Width="114" Click="BtnGetOrgsClick"/>

            </Grid>
        </GroupBox>
        <Button Name="btnCancel" Content="Cancel" Margin="0,0,10,10" Height="22" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75"  Click="BtnCancelClick"/>
        <Button Name="btnValidate" Content="OK" Margin="0,0,90,10" Height="22" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75" RenderTransformOrigin="-0.227,0.682"  Click="BtnValidateClick"/>


    </Grid>
</Window>
